package com.design.pattern.factory.simple;

/**
 * Created by Lxk on 2019/9/28.
 */
public class CarFactory {

    public static Car createCar(String type) {
        if ("Audi".equals(type)) {
            return new Audi();
        } else if ("Byd".equals(type)) {
            return new Byd();
        } else {
            return null;
        }
    }

}
